package lion.json.handlers;

import java.io.IOException;
import java.io.Writer;

import lion.json.IJsonHandler;

import org.apache.commons.codec.binary.Base64;

public class ByteArrayHandler implements IJsonHandler {

	@Override
	public void handle(Object o, Writer out) throws IOException {

		out.write("\"" + Base64.encodeBase64String((byte[]) o) + "\"");
	}

}
